package com.ky.user.controller;




import com.ky.user.service.PayLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;


/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wgz
 * @since 2024-06-21
 */
@Controller
@RequestMapping("/pay")
public class PayLogController {

    @Autowired
    private PayLogService payLogService;


    /**
     * 支付宝支付以后的回调
     * @return
     */
    @RequestMapping("/alipay/cb")
    public String alipayCallBack(@RequestParam("out_trade_no") String no){


        payLogService.alipayCallBack(no);
        System.out.println("支付成功");


        return "redirect:http://localhost:5173/orderPay";


    }
}

